#ifndef _DPC_H_
#define _DPC_H_
// File Name: dpc.h
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))

typedef unsigned short uint16_t;

typedef struct {
    uint16_t *data;
    int width;
    int height;
} Image;

typedef enum {MEAN=0, GRADIENT} Mode_e;

Image* create_image(int width, int height);
void show_image(Image* img, int width, int height);
void destroy_image(Image* img);
Image* pad_image(Image* img, int pad_size);
void clip_image(Image *img, uint16_t minVal, uint16_t maxVal);
void dead_pixel_correction(Image* img, int thres, Mode_e mode, uint16_t clip);

#endif

